<?php defined('_JEXEC') or die('Restricted access');?>
<?php $this->_ToolbarDefault();?>
<div id="janews-main">
<form action="index.php" method="post" name="adminForm">
<div id="editcell">
	<table class="adminlist">
	<thead>
		<tr>
			<th width="10">
				<?php echo JText::_( 'NUM' ); ?>
			</th>
			<th width="10">
				<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $this->tmpls ); ?>);" />
			</th>
			<th>
				<?php echo JHTML::_('grid.sort', JText::_("TITLE"), 's.title', @$this->lists['order_Dir'], @$this->lists['order'], $this->task ); ?>
			</th>
			<th>
				<?php echo JText::_( 'TEMPLATES' ); ?>
			</th>
			<th width="10%">
				<?php echo JText::_('TYPE'); ?>
			</th>
			<th width="10">
				<?php echo JText::_( 'ID' ); ?>
			</th>
		</tr>			
	</thead>
	<tfoot>
		<tr>
			<td colspan="10">
				<?php echo $this->pageNav->getListFooter(); ?>
			</td>
		</tr>
	</tfoot>
	<tbody>
	<?php
	$k = 0;
	for ($i=0, $n=count( $this->tmpls ); $i < $n; $i++)
	{
		$row = &$this->tmpls[$i];
		$checked 	= JHTML::_('grid.id',   $i, $row->id );
		$link 		= JRoute::_( 'index.php?option=com_janews&controller=layouttemplates&group='.$row->type.'&task=edit&cid[]='. $row->id );
		?>
		<tr class="<?php echo "row$k"; ?>">
			<td>
				<?php echo $this->pageNav->getRowOffset($i); ?>
			</td>
			<td>
				<?php echo $checked; ?>
			</td>
			<td>
				<a href="<?php echo $link; ?>"><?php echo $row->title; ?></a>
			</td>
			<td>
				<?php echo $row->template; ?>
			</td>
			<td align="center">
				<?php echo $row->type; ?></a>
			</td>
			<td>
				<?php echo $row->id; ?>
			</td>
		</tr>
		<?php
		$k = 1 - $k;
	}
	?>
	</tbody>
	</table>
</div>

<input type="hidden" name="option" value="com_janews" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="controller" value="layouttemplates" />
<input type="hidden" name="group" value="<?php echo $this->group; ?>" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
</div>